package data;

import java.util.*;

public class List {
	String state;
	protected Object stateoj;
	
	public Object idfind(String id){
		return null;
	}
	
	public void add(Object oj){
		state="add";
		stateoj=oj;
	}
	
	public void delete(Object oj){
		state="delete";
		stateoj=oj;
	}
	
	public void alter(Object oj){
		state="alter";
	}
	
	@SuppressWarnings("rawtypes")
	public Iterator findbykey(String key,String message){
		return null;
		
	}
	
	@SuppressWarnings("rawtypes")
	public Iterator get(){
		return null;
		
	}
	
	public void undo(){
		if(state.equals("add")){
			delete(stateoj);
		}
		else if(state.equals("delete")){
			add(stateoj);
		}
		else if(state.equals("alter")){
			alter(stateoj);
		}
	}
}
